package com.middlegroup.common.exception;

import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.util.Iterator;
import java.util.Properties;
import java.util.Set;
import java.util.TreeMap;
import java.util.Map.Entry;

public class ErrorCode implements Serializable {
    private static final long serialVersionUID = -8786587857867857901L;
    public static final String DEFAULT_OK_CODE = "E00000000";
    public static final String DEFAULT_FAIL_CODE = "E00090000";
    private static Properties ERROR_CODE = new Properties();

    public ErrorCode() {
    }

    public static String getMsg(String errorCode) {
        return null != errorCode && !errorCode.isEmpty()?ERROR_CODE.getProperty(errorCode, ""):"";
    }

    public static void main(String[] arg) {
        String code = "E03010001";
        String a = ",,a,b,c,,,,";
        String[] arr = a.split(",", -1);
        TreeMap sort = new TreeMap();
        sort.putAll(ERROR_CODE);
        Set set = sort.entrySet();

        Entry var7;
        for(Iterator var6 = set.iterator(); var6.hasNext(); var7 = (Entry)var6.next()) {
            ;
        }

    }

    static {
        InputStream in = ErrorCode.class.getResourceAsStream("");

        try {
            ERROR_CODE.load(in);
        } catch (IOException var2) {
            var2.printStackTrace();
        }

    }
}
